
import {list} from '../../../../../api/virtualStock'
let app = getApp();
Component({
  /**
   * 组件的属性列表
   */
  properties: {

  },
  lifetimes: {
    attached() {
      this.listclick()      
    }
  },
  /**
   * 组件的初始数据
   */
  data: {
    stocklist:[]

  },

  /**
   * 组件的方法列表
   */
  methods: {
    takegood(data){
      this.selectComponent('#bottomFrame').showFrame(
        data.currentTarget.dataset.data.productId, "buyNow");
    },
    listclick(){
      list({
        mch_id: app.globalData.mch_id,
        pageSize: 1000,
        subType: 0
      }).then(res=>{
        this.data.stocklist=res.data.data
        this.setData({
          stocklist:this.data.stocklist
        })
      })


    }
  },

})
